package com.easycms.common;

import cn.hutool.core.util.IdUtil;

/**
 * @author yushuo
 * @className
 * @descripton TODO
 * @date 2021/2/2 14:42
 **/
public class IdHelper {
    /**
     *
     * @author yushuo
     * @description 获取雪花id
     * @date 15:26 2021/1/26
     * @param []
     * @return long
     **/
    public static long nextId(){
        return IdUtil.getSnowflake(1,1).nextId();
    }

    /**
     *
     * @author yushuo
     * @description //获取mongodb的ObjectId
     * @date 15:27 2021/1/26
     * @param []
     * @return java.lang.String
     **/
    public static String objectId(){
        return IdUtil.objectId();
    }
}
